package Demo1;

class Bag{
    public int price;
    public int capacity;
    public String brand;

    void getVolume(){
        System.out.println("这个背包的体积是"+capacity+"升");
    }

    void getPrice(){
        System.out.println("这个背包的价格是"+price+"元");
    }

    public Bag(int price, int capacity, String brand) {
        this.price = price;
        this.capacity = capacity;
        this.brand = brand;
    }
}